/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.baladaboa.ws.core;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Leone
 */
@Entity
@Table(name = "preco_evento", catalog = "dbbaladaboa", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "PrecoEvento.findAll", query = "SELECT p FROM PrecoEvento p"),
    @NamedQuery(name = "PrecoEvento.findByIdprecoEvento", query = "SELECT p FROM PrecoEvento p WHERE p.idprecoEvento = :idprecoEvento"),
    @NamedQuery(name = "PrecoEvento.findByDescricaoTipo", query = "SELECT p FROM PrecoEvento p WHERE p.descricaoTipo = :descricaoTipo"),
    @NamedQuery(name = "PrecoEvento.findByNumLote", query = "SELECT p FROM PrecoEvento p WHERE p.numLote = :numLote"),
    @NamedQuery(name = "PrecoEvento.findByVrMasculino", query = "SELECT p FROM PrecoEvento p WHERE p.vrMasculino = :vrMasculino"),
    @NamedQuery(name = "PrecoEvento.findByVrFeminino", query = "SELECT p FROM PrecoEvento p WHERE p.vrFeminino = :vrFeminino"),
    @NamedQuery(name = "PrecoEvento.findByFlgLoteAtual", query = "SELECT p FROM PrecoEvento p WHERE p.flgLoteAtual = :flgLoteAtual")})
public class PrecoEvento implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idpreco_evento", nullable = false)
    private Integer idprecoEvento;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "descricao_tipo", nullable = false, length = 50)
    private String descricaoTipo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "num_lote", nullable = false)
    private int numLote;
    @Basic(optional = false)
    @NotNull
    @Column(name = "vr_masculino", nullable = false)
    private float vrMasculino;
    @Basic(optional = false)
    @NotNull
    @Column(name = "vr_feminino", nullable = false)
    private float vrFeminino;
    @Basic(optional = false)
    @NotNull
    @Column(name = "flg_lote_atual", nullable = false)
    private boolean flgLoteAtual;
    @JoinColumn(name = "evento_idevento", referencedColumnName = "idevento", nullable = false)
    @ManyToOne(optional = false)
    private Evento eventoIdevento;

    public PrecoEvento() {
    }

    public PrecoEvento(Integer idprecoEvento) {
        this.idprecoEvento = idprecoEvento;
    }

    public PrecoEvento(Integer idprecoEvento, String descricaoTipo, int numLote, float vrMasculino, float vrFeminino, boolean flgLoteAtual) {
        this.idprecoEvento = idprecoEvento;
        this.descricaoTipo = descricaoTipo;
        this.numLote = numLote;
        this.vrMasculino = vrMasculino;
        this.vrFeminino = vrFeminino;
        this.flgLoteAtual = flgLoteAtual;
    }

    public Integer getIdprecoEvento() {
        return idprecoEvento;
    }

    public void setIdprecoEvento(Integer idprecoEvento) {
        this.idprecoEvento = idprecoEvento;
    }

    public String getDescricaoTipo() {
        return descricaoTipo;
    }

    public void setDescricaoTipo(String descricaoTipo) {
        this.descricaoTipo = descricaoTipo;
    }

    public int getNumLote() {
        return numLote;
    }

    public void setNumLote(int numLote) {
        this.numLote = numLote;
    }

    public float getVrMasculino() {
        return vrMasculino;
    }

    public void setVrMasculino(float vrMasculino) {
        this.vrMasculino = vrMasculino;
    }

    public float getVrFeminino() {
        return vrFeminino;
    }

    public void setVrFeminino(float vrFeminino) {
        this.vrFeminino = vrFeminino;
    }

    public boolean getFlgLoteAtual() {
        return flgLoteAtual;
    }

    public void setFlgLoteAtual(boolean flgLoteAtual) {
        this.flgLoteAtual = flgLoteAtual;
    }

    public Evento getEventoIdevento() {
        return eventoIdevento;
    }

    public void setEventoIdevento(Evento eventoIdevento) {
        this.eventoIdevento = eventoIdevento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idprecoEvento != null ? idprecoEvento.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PrecoEvento)) {
            return false;
        }
        PrecoEvento other = (PrecoEvento) object;
        if ((this.idprecoEvento == null && other.idprecoEvento != null) || (this.idprecoEvento != null && !this.idprecoEvento.equals(other.idprecoEvento))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.baladaboa.ws.core.PrecoEvento[ idprecoEvento=" + idprecoEvento + " ]";
    }
    
}
